﻿@model Mvc4.Models.EpisodeModel

@{
    string change = ViewBag.Change;
    ViewBag.Title = change;
}

<h2>@change</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>EpisodeModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.ShowID)
        </div>
        <div class="editor-field" data-value="@Model.ShowID">
            @Html.DropDownListFor(m=>m.ShowID,(IEnumerable<SelectListItem>)ViewBag.ShowSelect)
           @*Html.EditorFor(m=>m.ShowID,(object)ViewBag.ShowSelect)*@
            @Html.ValidationMessageFor(model => model.ShowID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastWatched)
        </div>
        <div class="editor-field"  data-value="@Model.LastWatched">
            @Html.EditorFor(model => model.LastWatched)
            @Html.ValidationMessageFor(model => model.LastWatched)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EpisodeName)
        </div>
        <div class="editor-field" data-value="@Model.EpisodeName">
            @Html.EditorFor(model => model.EpisodeName)
            @Html.ValidationMessageFor(model => model.EpisodeName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EpisodeNumber)
        </div>
        <div class="editor-field" data-value="@Model.EpisodeNumber">
            @Html.EditorFor(model => model.EpisodeNumber)
            @Html.ValidationMessageFor(model => model.EpisodeNumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Season)
        </div>
        <div class="editor-field" data-value="@Model.Season">
            @Html.EditorFor(model => model.Season)
            @Html.ValidationMessageFor(model => model.Season)
        </div>

        <div class="editor-label" >
            @Html.LabelFor(model => model.Path)
        </div>
        <div class="editor-field" data-value="@Model.Path">
            @Html.EditorFor(model => model.Path)
            @Html.ValidationMessageFor(model => model.Path)
        </div>

        <p>
            <input type="submit" value="@change" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render(Links.Scripts.MinimalPost_js)
}
